// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/utils/request'


/**
 * 新增
 * @param
 */
export function doAdd(data) {
  return request({
    url: '/saveLinks',
    method: 'post',
    data
  })
}

/**
 * 删除
 * @param
 */
export function doDel(pram) {
  const data = {
    id: pram.id
  }
  return request({
    url: '/deleteLinksById',
    method: 'GET',
    params: data
  })
}

/**
 * 分页列表
 * @param
 */
export function getList(pram) {
  const data = {
    page: pram.page,
    limit: pram.limit,
    name: pram.name
  }
  return request({
    url: '/getLinksList',
    method: 'get',
    params: data
  })
}

/**
 * 修改
 * @param
 */
export function updateStatusApi(pram) {
  const data = {
    status: pram.status,
    id: pram.id
  }
  return request({
    url: '/updateLinksStatus',
    method: 'post',
    data: data
  })
}


